import '@/styles/common.scss'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

// 引入图片懒加载插件并注册
import { lazyPlugin } from '@/directives'
// 引入全局组件插件
import { componentPlugin } from '@/components'

// 使用插件
import persist from 'pinia-plugin-persistedstate'

const pinia = createPinia()
pinia.use(persist)

const app = createApp(App)
app.use(pinia)
app.use(lazyPlugin)
app.use(componentPlugin)
app.use(router)

app.mount('#app')
